<template>
	<view>
			<view class="flex cv mb20" @click="editClick">
				<image :src="data.img" :width="width" :style="'width:' +width+';height:200rpx'" mode="widthFix"></image>
				<view class="cover pl">
					<view class="flex h100p vertical t">
						<view>
							<view class="flex">
								<view class="cover">
									<view class="clip bold fz">{{data.name}}</view>
								</view>
								<view class="pl text-right orange noBreak">
									<text class="bold fz12">{{data.dec ? data.dec : ''}}</text>
								</view>
							</view>
							
							<view class="gray clip c3 fz12">{{data.intro}}</view>
						</view>
						
						<view class="fz12 gray mb3 flex lt">
							{{data.categoryName}} 
							<view class="plr2">·</view>
							
							<block>
								{{data.font}}
							</block>
						</view>
						
					</view>
					
				</view>
			</view>
			
	
	</view>
</template>

<script>
	export default {
		name:"uni-books-block",
		props:{
			flag : {
				type : String ,
				default: "novel"
			},
			data:{
				type : Object ,
				default(){
					return {} ;
				}
			},
			showRank : Boolean,
			showCategory : Boolean ,
			width : {
				type : [String , Number],
				default : "160rpx"
			}
		},
    methods: {
      editClick(){
      	this.$emit('flags',this.data)
      } 
    }
	}
</script>
<style>
</style>